package com.laiketui.order.service;


import com.laiketui.domain.user.User;
import com.laiketui.order.api.dto.ConfirmOrderParentDTO;
import com.laiketui.order.api.params.AgainConfirmOrderParams;
import com.laiketui.order.api.params.AgainPlaceOrderParams;
import com.laiketui.order.api.params.PlaceOrderParams;
import com.laiketui.order.api.params.store.*;
import org.apache.poi.ss.usermodel.Workbook;

import java.util.Date;
import java.util.Map;

public interface OrderProcessService {
    /**
     * 取消订单
     * @param orderParentNo
     */
    boolean cancelOrder(String orderParentNo,String cancelReason);

    ConfirmOrderParentDTO againConfirmOrder(AgainConfirmOrderParams confirmOrderParams, User user);

    //下单
    String againPlaceOrder(AgainPlaceOrderParams orderVo, User user);

    //再次购买加入到购物车
    String buyAgainToCart(AgainConfirmOrderParams confirmOrderParams, User user);

    /**
     * 更新预计发货时间
     * @param orderParentNo
     * @param estimatedDeliveryTime
     */
    boolean updateEstimatedDeliveryTime(String orderParentNo, Date estimatedDeliveryTime);

    /**
     * 如果母单所有子单已经发货 需要将母单状态改为
     * @param orderParentNo
     * @param userId
     * @return
     */
    boolean finishOrderParent(String orderParentNo,String orderNo, String userId);

    /**
     *
     * @param orderParentNo
     * @return
     */
    Workbook export(String orderParentNo);

    /**
     * 修改期望发货时间
     * @param params
     * @return
     */
    String editExpectedDeliveryTime(StoreEditExpectedDeliveryTimeParams params);

    /**
     * 修改收货地址
     * @param params
     * @return
     */
    String editDelivery(StoreEditDeliveryParams params);

    /**
     * 修改子单工厂备注
     * @param params
     * @return
     */
    String editMchRemark(StoreEditMchRemarkParams params);

    /**
     * 修改订单备注
     * @param params
     * @return
     */
    String editRemark(StoreEditRemarkParams params);

    /**
     * 修改发货单号
     * @param params
     * @return
     */
    String editDeliverNo(StoreEditDeliverNoParams params);

    /**
     * 质检完成/取消完成
     * @param params
     * @return
     */
    String editQualityInspection(StoreEditQualityInspectionParams params);

    /**
     *
     * @param params
     * @return
     */
    boolean finish(StoreFinishParams params);

    /**
     * 添加订单跟踪信息
     * @param params
     * @return
     */
    boolean addOrderParentMessage(StoreAddParentMessageParams params);

    /**
     * 修改质检单
     * @param params
     * @return
     */
    boolean editInspection(StoreInspectionParams params);

    /**
     * 修改发货单
     * @param params
     * @return
     */
    boolean editInvoice(StoreInvoiceParams params);

    /**
     * 修改平台实际发货时间
     */
    String editRealDeliveryTime(StoreEditRealDeliveryTimeParams params);

    /**
     * 平台改价及备注
     */
    String editOrderPriceAndRemark(StoreEditOrderPriceParams params);

    /**
     * 修改工厂实际发货时间
     */
    String editSpecifyDeliveryTime(StoreEditSpecifyDeliveryTimeParams params);
}
